<div class="container weixin_bj clearfix">
    <!-- Wall Title -->
    <div class="weixin_title">
    </div>
    

    <% i = 0 %>

    <% @messages.each do |message| %>
    <% i += 1 %>
    <% if (i % 2) == 0 && i < 20 %>
    <!-- content -->
    <div class="weixin_content">
      <div class="wx_user_box wx_user_box_L" msg-id="215" style="opacity: 1;">
        <div class="wx_user_head_box_L">
          <div class="wx_user_head">
            <img src="../images/avt_left.jpg">
          </div>
        </div>
        <div class="wx_user_txt_L">
          <div class="wx_user_T wx_user_T_L">
            <a style="color:#f00">
              <% p guest = GuestName.find_by_from_user_name(message.from_user_name) %>
                <% if guest != nil %>
                  <%= guest.real_name %>:&nbsp;
                <% else %>
                  来宾:&nbsp;
                <% end %>  
            </a>
            <%= message.content %></div>
          <div class="wx_user_sen wx_user_sen_L"></div>
          <div class="wx_user_sen wx_user_bor_L"></div>
        </div>
      </div>

      <% elsif (i % 2) == 1 && i < 20 %>
      <div class="wx_user_box wx_user_box_R" msg-id="214" style="opacity: 1;">
        <div class="wx_user_txt_R">
          <div class="wx_user_T wx_user_T_R">
            <a style="color:#f00">
              <% guest = GuestName.find_by_from_user_name(message.from_user_name) %>
                <% if guest != nil %>
                  <%= guest.real_name %>:&nbsp;
                <% else %>
                  来宾:&nbsp;
                <% end %>
            </a>
          <%= message.content %></div>
          <div class="wx_user_sen wx_user_sen_R"></div>
          <div class="wx_user_sen wx_user_bor_R"></div>
        </div>
        <div class="wx_user_head_box_R">
          <div class="wx_user_head"> 
            <img src="../images/avt_right.jpg">
          </div>
        </div>
      </div>
      <% end %>
    <% end %>
    </div>
  </div>
<input type="button" value="抽奖" onclick="window.location.href='../guest_names'">